/*
 *    Copyright 2022 CManLH
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package com.lifeonwalden.ms.caller.http.bean;

import org.apache.hc.core5.util.Args;

import java.io.File;
import java.io.Serializable;

/**
 * <p>Title: FileParam</p>
 * <p>Description:custom file parameter used as an element of HTTP messages.</p>
 *
 * @version V1.0
 * @auther wbluyanhuan
 * @since 2020/5/11 11:05
 */
public class FileParam implements Serializable {
    private static final long serialVersionUID = -759835019345203297L;

    private final String paramName;
    private final String fileName;
    private final File file;

    public FileParam(final String paramName, final String fileName, final File file) {
        this.paramName = Args.notNull(paramName, "ParamName");
        this.fileName = fileName;
        this.file = file;
    }

    public File getFile() {
        return file;
    }

    public String getParamName() {
        return paramName;
    }

    public String getFileName() {
        return fileName;
    }
}
